<template>
	<view class="mask" v-if="visible">
		<view class="">
			<view class="flex-right">
				<text class="close iconfont iconroundclose" @click="close"></text>
			</view>
			<view class="">
				<view class="redpacket-opened">
					<image class="redpacket-img" :src="$util.img('upload/uniapp/spread/redpacket-opened.png')" mode="aspectFit"></image>
					<view class="redpacket-money">{{money}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "diy-red-packet",
		props:{
			
		},
		data() {
			return {
				money: 0.00,
				visible: false
			};
		},
		methods:{
			show(money){
				this.visible = true;
				this.money = money;			
			},
			close(){
				this.visible = false;
			}	
		},
		created() {
			
		}
	}
</script>

<style lang="scss" scoped>
	.mask {
		display: flex;
		justify-content: center;
		align-items: center;
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;

		background: rgba(0, 0, 0, 0.8);
		z-index: 999;
	}
	.flex-right {
		display: flex;
		justify-content: flex-end;
		align-items: center;
	}

	.close {
		margin-right: 74rpx;
		font-size: 52rpx;
		color: #fff;
	}
	.redpacket-img,.redpacket-opened {
		width: 700rpx;
		height: 710rpx;
	}
	
	.redpacket-opened {
		position: relative;
		.redpacket-money{
			width: 100%;
			position: absolute;
			top: 300rpx;
			text-align: center;
			font-size: 72rpx;
			font-family: SourceHanSansCN-Bold, SourceHanSansCN;
			font-weight: bold;
			color: #FED997;
			line-height: 108rpx;
			// background: angular-gradient(180deg, #FFF7E3 0%, #FED894 100%);
			// -webkit-background-clip: text;
			// -webkit-text-fill-color: transparent;
			// z-index: 9999;
			&::after{
				content:'元';
				font-size: 40rpx;
				font-family: PingFangSC-Regular, PingFang SC;
				font-weight: 400;
				color: #D8D8D8;
				line-height: 56rpx;
				// background: angular-gradient(180deg, #FFF7E3 0%, #FED894 100%);
				// -webkit-background-clip: text;
				// -webkit-text-fill-color: transparent;
			}
		}
	}
</style>
